package com.cater.sys.entity;

import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;
import com.cater.common.BaseEntity;
/**
 * 
 * @描述:用户entity
 * @作者 :SD
 * @创建日期 :2015年9月24日 下午12:15:09
 *
 */
public class User extends BaseEntity{

	private static final long serialVersionUID = 1L;
	private Integer id;
	private String username;// 用户名
	@JSONField(serialize = false)
	private String password;// 密码
	private String truename;// 真名
	private String mobile;// 手机号
	private String email;// 邮箱
	@JSONField(serialize = false)
	private String createTime;// 创建时间
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	private String lastLoginTime;// 上次登录时间
	private String lastLoginIp;// 上次登录Ip
	private String locked;// 是否锁定 0:锁定 1：正常
	@JSONField(serialize = false)
	private Integer state;// 状态 1：正常 2：删除 3:停用
	private Dep dep;//部门id
	private Integer depid;
	private Integer datarole;//权限控制
	private String SKIN;//换色
	// 一个用户拥有多种角色
	private List<Role> roleList; // 拥有角色列表

	private String companyName;
	private String url="";			// app头像

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getTruename() {
		return truename;
	}

	public void setTruename(String truename) {
		this.truename = truename;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}


	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(String lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getLastLoginIp() {
		return lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	public String getLocked() {
		return locked;
	}

	public void setLocked(String locked) {
		this.locked = locked;
	}

	public Integer getState() {
		return state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", password=" + password + ", truename=" + truename
				+ ", mobile=" + mobile + ", email=" + email + ", createTime=" + createTime + ", lastLoginTime="
				+ lastLoginTime + ", lastLoginIp=" + lastLoginIp + ", state=" + state
				+ "]";
	}

	

	public Dep getDep() {
		return dep;
	}

	public void setDep(Dep dep) {
		this.dep = dep;
	}

	public Integer getDatarole() {
		return datarole;
	}

	public void setDatarole(Integer datarole) {
		this.datarole = datarole;
	}

	public List<Role> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<Role> roleList) {
		this.roleList = roleList;
	}

	public String getSKIN() {
		return SKIN;
	}

	public void setSKIN(String sKIN) {
		SKIN = sKIN;
	}

	public Integer getDepid() {
		return depid;
	}

	public void setDepid(Integer depid) {
		this.depid = depid;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
